#!/usr/bin/env python
# -*- coding: utf-8 -*-
#该指标被税贷指标所替代
'''eof
name:企业类型
code:EntType_NotMatch
tableName:
columnName:
groups:准入>企业业务信息校验
dependencies:EG
type:常用指标
dataSourceType:在线指标
description:
eof'''

def CompanyTypeOptimize():
    null_type_list = ['', None, 'null', 'Null', 'NULL', '/']
    count_list = ['9300', '9310', '4540', 9300, 9310, 4540]
    try:
        jbxx = EG['srcData'][0]['EG']['results'][0]["jbxx"]
        if jbxx.has_key('company_companytype') and jbxx['company_companytype'] not in null_type_list:
            if jbxx['company_companytype'] in count_list:
                return 1
            else:
                return 0
        else:
            return u'缺失值'
    except:
        return u'缺失值'

result = CompanyTypeOptimize()


